package com.aspose.cells;

import java.util.Iterator;

class zbge extends zcj {
   zbge(zn var1, float var2, float var3, zbkq var4) {
      super(var1, var2, var3, var4);
   }

   private zadd[] c(com.aspose.cells.b.a.b.zq var1) {
      com.aspose.cells.b.a.b.a.ze var2 = null;
      if (this.e.c() == null) {
         return null;
      } else {
         zacc var3 = this.e.c();
         int var4 = var3.a().size();
         zadd[] var5 = new zadd[var4];

         int var6;
         for(var6 = 0; var6 < var4; ++var6) {
            var5[var6] = new zadd();
         }

         boolean var25 = false;
         boolean var7 = false;
         float var8 = 0.0F;
         float var9 = 0.0F;
         float var10 = 0.0F;
         float var11 = 0.0F;
         float var12 = 0.0F;
         float var13 = 0.0F;
         float var14 = 0.0F;
         float var15 = 0.0F;
         int var16 = (int)var1.f();
         int var17 = (int)var1.g();
         int var18 = (int)var1.h();
         int var19 = (int)var1.i();
         zaca var20 = null;

         for(int var21 = 0; var21 < var4; ++var21) {
            var20 = (zaca)var3.a().get(var21);
            var6 = (int)var20.c();
            int var26 = (int)var20.b();
            if (var6 == 0) {
               var6 = 1;
            }

            if (var26 == 0) {
               var26 = 1;
            }

            var2 = new com.aspose.cells.b.a.b.a.ze();
            Iterator var22 = ((zaca)var3.a().get(var21)).a().iterator();

            while(var22.hasNext()) {
               zanv var23 = (zanv)var22.next();
               com.aspose.cells.b.a.b.zn[] var24 = new com.aspose.cells.b.a.b.zn[4];
               if (var23.b().size() == 0) {
                  ;
               }

               if (var23.b().size() == 1) {
                  var24[0] = (com.aspose.cells.b.a.b.zn)var23.b().get(0);
               } else if (var23.b().size() == 2) {
                  var24[0] = (com.aspose.cells.b.a.b.zn)var23.b().get(0);
                  var24[1] = (com.aspose.cells.b.a.b.zn)var23.b().get(1);
               } else if (var23.b().size() == 4) {
                  var24[0] = (com.aspose.cells.b.a.b.zn)var23.b().get(0);
                  var24[1] = (com.aspose.cells.b.a.b.zn)var23.b().get(1);
                  var24[2] = (com.aspose.cells.b.a.b.zn)var23.b().get(2);
                  var24[3] = (com.aspose.cells.b.a.b.zn)var23.b().get(3);
               }

               switch(var23.a()) {
               case 0:
                  var10 = (float)var24[1].a() / (float)var6 * (float)var18 + (float)var16;
                  var11 = (float)var24[1].b() / (float)var26 * (float)var19 + (float)var17;
                  var2.b(var8, var9, var10, var11);
                  var8 = var10;
                  var9 = var11;
                  break;
               case 1:
                  var10 = (float)var24[1].a() / (float)var6 * (float)var18 + (float)var16;
                  var11 = (float)var24[1].b() / (float)var26 * (float)var19 + (float)var17;
                  var12 = (float)var24[2].a() / (float)var6 * (float)var18 + (float)var16;
                  var13 = (float)var24[2].b() / (float)var26 * (float)var19 + (float)var17;
                  var14 = (float)var24[3].a() / (float)var6 * (float)var18 + (float)var16;
                  var15 = (float)var24[3].b() / (float)var26 * (float)var19 + (float)var17;
                  var2.a(var8, var9, var10, var11, var12, var13, var14, var15);
                  var8 = var14;
                  var9 = var15;
                  break;
               case 2:
                  var2.j();
                  var8 = (float)var24[0].a() / (float)var6 * (float)var18 + (float)var16;
                  var9 = (float)var24[0].b() / (float)var26 * (float)var19 + (float)var17;
                  break;
               case 3:
                  var2.i();
               }
            }

            var5[var21].a = var2;
            var5[var21].c = var20.e();
            var5[var21].b = var20.d();
         }

         return var5;
      }
   }

   void d() {
      float var1 = this.e.k().f();
      float var2 = this.e.k().g();
      float var3 = this.e.k().h();
      float var4 = this.e.k().i();
      com.aspose.cells.b.a.b.zq var5 = new com.aspose.cells.b.a.b.zq(var1, var2, var3, var4);
      com.aspose.cells.b.a.b.a.zf var6 = this.a.e();
      this.a.a(4);
      com.aspose.cells.b.a.b.zm var7 = zbul.a(this.e.m());
      zadd[] var8 = this.c(var5);
      com.aspose.cells.b.a.b.zc var9 = null;
      if (var8 != null) {
         int var10 = var8.length;
         if (var10 != 0) {
            for(int var11 = 0; var11 < var10; ++var11) {
               if (!this.e.l().a() && var8[var11].c) {
                  var9 = zbul.a(this.e.l(), var8[var11].a);
                  this.a.a(var9, var8[var11].a);
               }

               if (!this.e.m().a() && var8[var11].b) {
                  this.a.a(var7, var8[var11].a);
               }
            }

            super.b();
            this.a.a(var6);
         }
      }
   }

   void a() {
      this.d();
   }
}
